package com.dongdongqiang.daogenerator.handler;

import com.dongdongqiang.daogenerator.pojo.BasePage;
import com.dongdongqiang.daogenerator.pojo.PageSearchForm;

import java.sql.Connection;
import java.util.List;
import java.util.Map;

/**
 * 查询
 * Created by ZZB on 2017/9/24.
 */
public interface IQueryHandler {
    <T> T getBy(Object pk, Class<T> tClass, Connection connection);
    <T> T findBy(String c,Object o,Class<T> tClass, Connection connection);
    <T> List<T> queryBy(String c,Object o , Class<T> tClass, Connection connection);
    <T> long countBy(String c,Object o , Class<T> tClass, Connection connection);

    <T> List<T> query(String sql, Class<T> tClass ,Connection connection);
    <T> List<T> query(String sql,Class<T> tClass , Object[] objects, Connection connection);
    long queryCount(String sql, Connection connection);
    long queryCount(String sql, Object[] objects, Connection connection);
}
